import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '容器id',
    dataIndex: 'conId'
   },
   {
    title: 'sys（系统参数）或user（自定义参数）或curve（曲线）',
    dataIndex: 'paraType'
   },
   {
    title: '系统参数ID',
    dataIndex: 'paraId'
   },
   {
    title: '容器高优先覆盖 ',
    dataIndex: 'defineName'
   },
   {
    title: '曲线颜色',
    dataIndex: 'curveColor'
   },
   {
    title: '线型',
    dataIndex: 'lineFont'
   },
   {
    title: '粗细',
    dataIndex: 'weight'
   },
   {
    title: '排序值',
    dataIndex: 'sort'
   },
   {
    title: '删除状态 1已删除 0未删除',
    dataIndex: 'delFlag'
   },
   {
    title: '用户id',
    dataIndex: 'userId'
   },
   {
    title: '系统参数id字符串(逗号分隔)',
    dataIndex: 'func'
   },
   {
    title: '计算公式',
    dataIndex: 'mathFunc'
   },
   {
    title: '单位',
    dataIndex: 'unit'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '容器id',
    field: 'conId',
    component: 'Input'
  },
 {
    label: 'sys（系统参数）或user（自定义参数）或curve（曲线）',
    field: 'paraType',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '容器id',
    field: 'conId',
    component: 'Input',
  },
  {
    label: 'sys（系统参数）或user（自定义参数）或curve（曲线）',
    field: 'paraType',
    component: 'Input',
  },
  {
    label: '系统参数ID',
    field: 'paraId',
    component: 'Input',
  },
  {
    label: '容器高优先覆盖 ',
    field: 'defineName',
    component: 'Input',
  },
  {
    label: '曲线颜色',
    field: 'curveColor',
    component: 'Input',
  },
  {
    label: '线型',
    field: 'lineFont',
    component: 'Input',
  },
  {
    label: '粗细',
    field: 'weight',
    component: 'Input',
  },
  {
    label: '排序值',
    field: 'sort',
    component: 'Input',
  },
  {
    label: '删除状态 1已删除 0未删除',
    field: 'delFlag',
    component: 'Input',
  },
  {
    label: '用户id',
    field: 'userId',
    component: 'Input',
  },
  {
    label: '系统参数id字符串(逗号分隔)',
    field: 'func',
    component: 'Input',
  },
  {
    label: '计算公式',
    field: 'mathFunc',
    component: 'Input',
  },
  {
    label: '单位',
    field: 'unit',
    component: 'Input',
  },
];
